package xyz.heyaoshare.core.controller.system.dict.vo.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import xyz.heyaoshare.core.entity.system.DictType;
import xyz.heyaoshare.core.enums.system.dict.DictDataStatusEnum;
import xyz.heyaoshare.utils.DateUtils;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 通过类型获取字典数据响应对象
 * @author YueHe
 * @version 0.0.1
 * @since 2025/5/9 下午5:06
 */
@Data
@Schema(description = "通过类型获取字典数据响应对象")
public class DictDataByTypeRespVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "数据ID")
    private Long id;

    /**
     * @see DictType
     */
    @Schema(description = "字典类型ID")
    private Long dictTypeId;

    @Schema(description = "字典值")
    private String value;

    @Schema(description = "字典标签")
    private String label;

    @Schema(description = "文本样式")
    private String style;

    @Schema(description = "排序")
    private Integer sort;

    /**
     * @see DictDataStatusEnum#getValue()
     */
    @Schema(description = "状态【1可用，不可用】")
    private Integer status;

    @Schema(description = "状态描述【1可用，不可用】")
    private String statusStr;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.YYYY_MM_DD_HH_MM_SS, timezone = DateUtils.TIME_ZONE)
    private LocalDateTime createTime;

    @Schema(description = "备注")
    private String remark;

}